<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex searchList_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center searchList_fd0_0' @tap="handleJumpDiy" data-type="back"
					data-url="1">
					<image class='searchList_fd0_0_c0' mode="aspectFit" :src='STATIC_URL+"296.png"'></image>
				</view>
				<text class='searchList_fd0_1'>热搜榜单</text>
				<view class='flex flex-wrap align-center justify-end searchList_fd0_2'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
				<image class='searchList_fd1_0' mode="aspectFill" :src='data.thumb'></image>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout searchList_flex_2">
				<template v-for='(item,key0) in LISTList'>
					<view class='flex flex-direction flex-wrap align-stretch searchList_fd2_0' @tap="handleJumpDiy"
						data-type="navigateTo"
						:data-url="`/pages/index/serviceDetails/serviceDetails?id=${item.aid}&serviceName=${item.service_title}`"
						:key='key0'>
						<view class='flex flex-wrap align-start'>
							<view class='flex flex-wrap align-center searchList_fd2_0_c0_c0'>
								<image class='searchList_fd2_0_c0_c0_c0' mode="aspectFill" :src='item.picture'></image>
								<image class='searchList_fd2_0_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"307.png"'
									v-if=" key0==0"></image>
								<image class='searchList_fd2_0_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"375.png"'
									v-if=" key0=='1'"></image>
								<image class='searchList_fd2_0_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"376.png"'
									v-if=" key0=='2'"></image>
							</view>
							<view
								class='flex flex-direction flex-wrap align-stretch justify-between flex-sub searchList_fd2_0_c0_c1'>
								<text class='searchList_fd2_0_c0_c1_c0'>{{item.service_title}}</text>
								<view class='flex flex-wrap align-end'>
									<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
										<view class='flex flex-wrap align-center searchList_fd2_0_c0_c1_c1_c0_c0'>
											<text
												class='searchList_fd2_0_c0_c1_c1_c0_c0_c0'>{{item.sales_volume}}</text>
											<text class='searchList_fd2_0_c0_c1_c1_c0_c0_c0'>人已购买</text>
										</view>
										<view class='flex flex-wrap align-end'>
											<text class='searchList_fd2_0_c0_c1_c1_c0_c1_c0'>￥</text>
											<text class=' searchList_fd2_0_c0_c1_c1_c0_c1_c1'>
												<text>{{ item.deposit_money | frontPrice }}</text>
												<text
													class=' searchList_price2_fd2_0_c0_c1_c1_c0_c1_c1'>{{ item.deposit_money | laterPrice }}</text>
											</text>
										</view>
									</view>
									<button class='searchList_fd2_0_c0_c1_c1_c1' @tap.stop="handleJumpDiy"
										data-type="navigateTo"
										:data-url="`/pages/index/serviceDetails/serviceDetails?id=${item.aid}&serviceName=${item.service_title}`">抢购</button>
								</view>
							</view>
						</view>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"LISTList": [],
				"data": {
					"thumb": ""
				},
				"cityinfo": {
					"text": "",
					"lat": "",
					"lng": ""
				},
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getImageFunc()
			this.getLISTFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取热搜榜单
			getLISTFunc() {
				this.cityinfo = uni.getStorageSync('cityinfo')
				this.minixPagingListsApi = global.apiUrls.post641560290d8e9;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					city_name: this.cityinfo.text
				}
				this.listData = [];
				this.LISTList = this.listData;
				this.pagingListToggle();

			},
			//获取热搜头部图片
			async getImageFunc() {
				//请求方法
				//数据验证

				let datadata = await this.$api.get(global.apiUrls.post64e0357be345a, {

				});

				if (datadata.data.code != 1) {
					this.$message.info(datadata.data.msg);
					return
				}
				let infodata = datadata.data;
				this.data = infodata.data

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
	}

	.searchList_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.searchList_fd0_2 {
		width: 120rpx;
		height: 88rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.searchList_fd0_1 {
		color: #333333;
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.searchList_fd0_0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.searchList_fd0_0 {
		width: 120rpx;
		height: 88rpx;
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.searchList_fd1_0 {
		width: 750rpx;
		height: 422rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.searchList_flex_2 {
		padding: 0rpx 24rpx 0rpx 24rpx;
		position: relative;
		margin: -89rpx 0rpx 0rpx 0rpx;
	}

	.searchList_fd2_0_c0_c1_c1_c1 {
		background: rgba(227, 29, 26, 1);
		border-radius: 28rpx 28rpx 28rpx 28rpx;
		width: 130rpx;
		line-height: 56rpx;
		font-size: 24rpx;
		color: #fff;
		height: 56rpx;
	}

	.searchList_price2_fd2_0_c0_c1_c1_c0_c1_c1 {
		font-size: 24rpx;
	}

	.searchList_fd2_0_c0_c1_c1_c0_c1_c1 {
		color: #FF5050;
		font-weight: 700;
		line-height: 32rpx;
		font-size: 40rpx;
	}

	.searchList_fd2_0_c0_c1_c1_c0_c1_c0 {
		color: #FF5050;
		font-size: 24rpx;
		font-weight: 700;
		line-height: 32rpx;
	}

	.searchList_fd2_0_c0_c1_c1_c0_c0_c0 {
		color: #999999;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 33rpx;
	}

	.searchList_fd2_0_c0_c1_c1_c0_c0 {
		margin: 0rpx 0rpx 16rpx 0rpx;
	}

	.searchList_fd2_0_c0_c1_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 500;
		line-height: 40rpx;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.searchList_fd2_0_c0_c1 {
		height: 200rpx;
	}

	.searchList_fd2_0_c0_c0_c1 {
		width: 44rpx;
		height: 44rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		top: -12rpx;
		left: 0rpx;
	}

	.searchList_fd2_0_c0_c0_c0 {
		width: 200rpx;
		height: 200rpx;
		border-radius: 16rpx;
	}

	.searchList_fd2_0_c0_c0 {
		position: relative;
		margin: 0rpx 24rpx 0rpx 0rpx;
	}

	.searchList_fd2_0 {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 32rpx 24rpx 24rpx 24rpx;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
</style>